﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// System_Log数据模型对象
    /// </summary>
    [Serializable]
    public partial class System_LogMod
    {
        /// <summary>
        /// 初始化System_Log数据模型对象
        /// </summary>
        public System_LogMod()
        {
            
        }
        /// <summary>
        /// 初始化System_Log数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        public System_LogMod(long iD)
        {
            //给ID字段赋值
            this.ID = iD;
        }
        /// <summary>
        /// 初始化System_Log数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="type">Type</param>
        /// <param name="userID">UserID</param>
        /// <param name="userName">UserName</param>
        /// <param name="description">Description</param>
        /// <param name="occurTime">OccurTime</param>
        public System_LogMod(long iD,string type,string userID,string userName,string description,DateTime? occurTime)
        {
            //给ID字段赋值
            this.ID = iD;
            //给Type字段赋值
            this.Type = type;
            //给UserID字段赋值
            this.UserID = userID;
            //给UserName字段赋值
            this.UserName = userName;
            //给Description字段赋值
            this.Description = description;
            //给OccurTime字段赋值
            this.OccurTime = occurTime;
        }
        
		//属性存储数据的变量
        private long _iD;
        private string _type;
        private string _userID;
        private string _userName;
        private string _description;
        private DateTime? _occurTime;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// Type
        /// </summary>
        public string Type
        {
            get { return this._type; }
            set { this._type = value; }
        }
        /// <summary>
        /// UserID
        /// </summary>
        public string UserID
        {
            get { return this._userID; }
            set { this._userID = value; }
        }
        /// <summary>
        /// UserName
        /// </summary>
        public string UserName
        {
            get { return this._userName; }
            set { this._userName = value; }
        }
        /// <summary>
        /// Description
        /// </summary>
        public string Description
        {
            get { return this._description; }
            set { this._description = value; }
        }
        /// <summary>
        /// OccurTime
        /// </summary>
        public DateTime? OccurTime
        {
            get { return this._occurTime; }
            set { this._occurTime = value; }
        }
        
        /// <summary>
        /// 对比两个System_Log数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的System_Log数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成System_Log数据模型对象
            System_LogMod system_LogMod = obj as System_LogMod;
            //判断是否转换成功
            if (system_LogMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == system_LogMod.ID &&
                //判断Type是否一致
                this.Type == system_LogMod.Type &&
                //判断UserID是否一致
                this.UserID == system_LogMod.UserID &&
                //判断UserName是否一致
                this.UserName == system_LogMod.UserName &&
                //判断Description是否一致
                this.Description == system_LogMod.Description &&
                //判断OccurTime是否一致
                this.OccurTime == system_LogMod.OccurTime;
        }
        /// <summary>
        /// 将当前System_Log数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将System_Log数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将Type进行按位异或运算处理
                (this.Type == null ? 2147483647 : this.Type.GetHashCode()) ^
                //将UserID进行按位异或运算处理
                (this.UserID == null ? 2147483647 : this.UserID.GetHashCode()) ^
                //将UserName进行按位异或运算处理
                (this.UserName == null ? 2147483647 : this.UserName.GetHashCode()) ^
                //将Description进行按位异或运算处理
                (this.Description == null ? 2147483647 : this.Description.GetHashCode()) ^
                //将OccurTime进行按位异或运算处理
                (this.OccurTime == null ? 2147483647 : this.OccurTime.GetHashCode());
        }
        /// <summary>
        /// 将当前System_Log数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前System_Log数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID +
                "]";
        }
    }
}
